<template>
	<!-- 
		插槽content：放内容的
			title: 标题
	 -->
	<uni-popup ref='popup' background-color="rgba(34, 35, 36, 1)">
		<view class="ejectTitle">
			<span>
				<slot name="title"></slot>
			</span>
			<image @click='close' src='@/static/images/Home/no.png' class="no"></image>
		</view>
		<slot name="cont"></slot>
	</uni-popup>
</template>

<script setup lang="ts">
	import { ref, defineExpose } from 'vue'
	const popup = ref('')
	const open = () => {
		popup.value.open('bottom')
	}
	const close = () => {
		popup.value.close()
	}
	// 暴露子组件方法或值
	defineExpose({ open })
</script>

<style lang="scss" scoped>
	.ejectTitle {
		position: relative;
		height: 98px;
		background-color: rgba(34, 35, 36, 1);
		text-align: center;
		margin-left: 32px;
		margin-right: 32px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);

		span {
			height: 48px;
			font-size: 40px;
			font-family: MicrosoftYaHei;
			color: #FFFFFF;
			line-height: 98px;
		}

		image {
			// background-color: #A82DC0;
			position: absolute;
			width: 72px;
			height: 72px;
			top: 50%;
			right: 0;
			transform: translateY(-50%);
		}
	}
</style>